home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Turn the Power On! 3
/
Turn the Power On! HP Volume III (HP)(1995).ISO
/
poweron-iii
< prev
next >
Wrap
Text File
|
1995-10-03
|
3KB
|
163 lines
#!/bin/ksh
# @(#) Version 3.0 August 1995
# Updated 22-Sep-95 for MPower Detection & Notification (WSG)
set +u
arg0=$0
PWD=`pwd`
umask a=rwx
#
# Check to see if MPower is installed
#
MPOWER_CHECK_FILE="/usr/video/bin"
if [[ -a $MPOWER_CHECK_FILE ]] # file (or dir) doesn't have non-zero length
then
# file exists
MPOWER_FOUND=".T."
else
# file doesn't exist
MPOWER_FOUND=".F."
fi
if [ $MPOWER_FOUND = ".F." ]
then
/usr/bin/X11/xdialog -geometry -1+0 -O "Click to Exit" -t "MPower Not Found" -p HPlogo.bm -m \
"Turn the Power ON! needs to have
MPower installed in order to operate
properly. Please have your System
Administrator run the MPower audio
and video driver installation script
found in the 'install_these' directory." &
exit 1
fi
DIR=`dirname $arg0`
BASE=PowerON-II
if [ $DIR = "." ]
then
PATH_NAME=${PWD}/lib/${BASE}/
else
PATH_NAME=${DIR}/lib/${BASE}/
fi
LANGU=${LANG:=american}
case ${LANGU} in
american ) ;;
japanese ) ;;
japanese.euc ) LANGU=japanese ;;
katakana ) LANGU=japanese ;;
chinese-t ) ;;
chinese-s ) LANGU=chinese-t ;;
korean ) ;;
* ) LANGU=american ;;
esac
if [ ! -d $PATH_NAME${LANGU} ]
then
LANGU=american
echo "The requested language was not found ! Proceeding in English."
fi
echo @DEMO_HOME > /tmp/poweronii_vars
echo ${PATH_NAME} >> /tmp/poweronii_vars
echo @LANGUAGE >> /tmp/poweronii_vars
echo ${LANGU}/ >> /tmp/poweronii_vars
#
# Set the working directory for the Mpresent program.
#
AIMTECH=${PATH_NAME}../../bin
#
# Set the Variable File to load
#
AIM_VAR=${PATH_NAME}
#
# Export the variables
#
export AIMTECH AIM_VAR
export DEMO_HOME=${PATH_NAME}
#
#
MP=${PATH_NAME}../../bin/Mpresent
export SHLIB_PATH=${PATH_NAME}../../lib/misc
if [ -x /usr/audio/bin/send_sound ]
then
export SendAudio=/usr/audio/bin/send_sound
elif [ -x /usr/audio/bin/acontrol ]
then
export SendAudio=${PATH_NAME}../../bin/send_sound
fi
cd ${PATH_NAME}
#../../bin/ilcolors 0 &
#IL_PID=$!
#sleep 1
#kill -0 $IL_PID 2>/dev/null
#IL_STAT=$?
#if [ 0 -ne ${IL_STAT} ]
# then
# /usr/bin/X11/xdialog -t "PowerON II" -p HPlogo.bm -m \
#" There are not enough colors
# available for this demo to run
# correctly. Please stop some
# applications and try again."
# exit 1
#fi
aserver=`ps -e|grep Aserver`
if [ ! "$aserver" ]
then
/usr/bin/X11/xdialog -t "Audio Server" -p HPlogo.bm -m \
" The audio server does not
appear to be running. You
will not be able to hear
any sounds."
fi
trap " kill $IL_PID ; ../../bin/kfork drive_server ; rm -f /tmp/poweron_vars /tmp/windows.dbf ; exit " 2 3 15
/usr/bin/X11/xdialog -t "PowerON II" -p HPlogo.bm -m \
"
Welcome to Turn the PowerON II
Loading the Demo from disk.
Please wait" &
XWD_PID=$!
#cover/cache.ksh
PATH=$PATH:.
DISPLAY=${DISPLAY:=local:0}
export SB_710_VM_DB=TRUE
#export AIM_VAR=$PATH_NAME
if [ -x /usr/audio/bin/AudioCP ]
then
/usr/audio/bin/AudioCP -geometry +0-1&
elif [ -x /usr/audio/bin/acontrol ]
then
/usr/audio/bin/acontrol -geometry +0-1&
fi
ACP=$!
kill $XWD_PID 2>/dev/null
$MP ${PATH_NAME}PowerON_New.iw
#$MP ${PATH_NAME}test.iw
kill $IL_PID 2>/dev/null
kill $ACP
../../bin/kfork drive_server
../../bin/kfork send_sound
../../bin/kfork mplay
../../bin/kfork cover.ksh
rm -f /tmp/poweron_vars /tmp/windows.dbf